#!/bin/sh
for vcs in $* ; do
    echo "checking $vcs..."
    if test -d $vcs/.git ; then
        remote=`cd $vcs ; git remote`
        if test -z "$remote" ; then
            (cd $vcs ; git svn rebase)
        else
            (cd $vcs ; git pull)
        fi
    elif test -d $vcs/.bzr ; then
        (cd $vcs ; bzr update)
    elif test -d $vcs/.svn ; then
        svn update $vcs
    fi
done
